//
//  Dog.m
//  StoreDataDemo
//
//  Created by holyen on 12-10-9.
//  Copyright (c) 2012年 holyen. All rights reserved.
//

#import "Dog.h"

@implementation Dog
@synthesize name = _name ,age = _age ,sex = _sex ,tel = _tel,qq = _qq,avator = _avator;

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:_name forKey:@"name"];
    [aCoder encodeObject:_age forKey:@"age"];
    [aCoder encodeObject:_sex forKey:@"sex"];
    [aCoder encodeObject:_tel forKey:@"tel"];
    [aCoder encodeObject:_qq forKey:@"qq"];
    [aCoder encodeObject:_avator forKey:@"avator"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self)
    {
        [self setName:[aDecoder decodeObjectForKey:@"name"]];
        [self setAge:[aDecoder decodeObjectForKey:@"age"]];
        [self setSex:[aDecoder decodeObjectForKey:@"sex"]];
        [self setTel:[aDecoder decodeObjectForKey:@"tel"]];
        [self setQq:[aDecoder decodeObjectForKey:@"qq"]];
        [self setAvator:[aDecoder decodeObjectForKey:@"avator"]];
    }
    return self;
}
@end
